#ifndef RP2POLYGONOFFSETSTATE_H
#define RP2POLYGONOFFSETSTATE_H

#include "Rp2GlobalState.h"

namespace Rp2
{


class PolygonOffsetState : public GlobalState
{
RP2_DECLARE_INITIALIZE;
RP2_DECLARE_TERMINATE;

public:
	PolygonOffsetState();
	virtual ~PolygonOffsetState();

	virtual StateType GetStateType() const { return POLYGONOFFSET; }

    // Set whether offset should be enabled for the various polygon drawing
    // modes (fill, line, point).	
    bool FillEnabled;   // default: false
    bool LineEnabled;   // default: false
    bool PointEnabled;  // default: false

    // The offset is Scale*dZ + Bias*r where dZ is the change in depth
    // relative to the screen space area of the poly, and r is the smallest
    // resolvable depth difference.  Negative values move polygons closer to
    // the eye.
    float Scale;  // default: 0.0
    float Bias;   // default: 0.0
};

RP2_REGISTER_INITIALIZE(PolygonOffsetState);
RP2_REGISTER_TERMINATE(PolygonOffsetState);
typedef Pointer<PolygonOffsetState> PolygonOffsetStatePtr;

}

#endif